package com.cims.bo.order;

import java.util.List;

import com.cims.common.exception.BoException;
import com.cims.common.vo.OrderItem;
import com.cims.dao.order.OrderItemDAO;
import com.cims.dao.order.OrderItemDAOImpl;

public class OrderItemBOImpl implements OrderItemBO{

	OrderItemDAO	dao	= new OrderItemDAOImpl();

	@Override
	public List<OrderItem> getListOrder() throws BoException{
		try{
			return dao.getListOrder();
		}catch(Exception e){
			return null;
		}
	}

	@Override
	public OrderItem findByOrderItemId(int orderId) throws BoException{
		try{
			return dao.findByOrderItemId(orderId);
		}catch(Exception e){
			return null;
		}
	}

	@Override
	public void addOrderItem(OrderItem item) throws BoException{
		try{
			dao.addOrderItem(item);
		}catch(Exception e){
			System.out.println(e.getMessage());
		}

	}

	@Override
	public List<OrderItem> getListOrderUnAssigned() throws BoException {
		try {
			return dao.getListOrderUnAssigned();
		} catch (Exception e) {
			// TODO: handle exception
		}
		return null;
	}

}
